package com.thor.palmmall.rest.order.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.order.AProductCategory;
import com.thor.palmmall.rest.order.AProductProperties;
import com.thor.palmmall.spi.order.SProductProperties;

public class AProductPropertiesConverter implements Converter<SProductProperties,AProductProperties>{
	private static AProductPropertiesConverter instance;
	public static AProductPropertiesConverter getInstance() {
		if (instance == null)
			instance = new AProductPropertiesConverter();
		return instance;
	}
	@Override
	public AProductProperties convert(SProductProperties source) {
		AProductProperties target = new AProductProperties();
		target.setUnit(source.getUnit());
		target.setModel(source.getModel());
		target.setSpecification(source.getSpecification());
		target.setGrade(source.getGrade());
		return target;
	}

}

